const express = require("express");
const app = express();
const cookieParser = require("cookie-parser");

app.use(cookieParser("hagsdhgsajdsgja"))

app.get("/a", (req, res) => {
    console.log(req.cookies) //读取未签名cookie
    console.log(req.signedCookies) //读取的是一个签名cookie
    res.cookie("sum", 99.8, {
        maxAge: 2 * 3600 * 24 * 1000,
        signed: true
    })
    res.send("hahah")
})


app.listen(3000)